package org.september.pisces.filestore.entity;

import org.september.smartdao.anno.AutoIncrease;
import org.september.smartdao.anno.Entity;
import org.september.smartdao.anno.Id;
import org.september.smartdao.common.BaseEntity;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;

/**
 * 文件
 **/
@Entity
@Table("pisces_file_store_item")
public class FileStoreItem extends BaseEntity {

    /**
     *
     */
    @Id
    @AutoIncrease
    @IsKey
    @IsAutoIncrement
    @Column(name = "id", length = 20)
    private Long id;

    @Size(max = 64)
    @NotEmpty
    @Column(name = "file_uuid", comment = "文件uuid", length = 64, isNull = false)
    private String fileUUID;


    @NotEmpty
    @Column(name = "pool_id", comment = "存储池名称", isNull = false)
    private Long poolId;

    /**
     * 文件访问地址
     **/
    @Column(name = "path", comment = "文件访问地址", length = 255)
    private String path;

    /**
     * 文件后缀
     **/
    @Column(name = "ext", comment = "文件后缀", length = 16)
    private String ext;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

	public String getFileUUID() {
		return fileUUID;
	}

	public void setFileUUID(String fileUUID) {
		this.fileUUID = fileUUID;
	}

	public Long getPoolId() {
		return poolId;
	}

	public void setPoolId(Long poolId) {
		this.poolId = poolId;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }
}
